/**
 * 
 * Class exists to maintain the time of the simulation.
 * 
 * Contributors: Conor Craig
 * 
 * */

package project;

public class SimulationTime extends Thread{

	private final int maxMinutes;
	
	private int currTime;
	
	
	/**
	 * Time object that will interact with Statistics.
	 * */
	public SimulationTime(int maxMinutes) {
		this.maxMinutes = maxMinutes;
	}

	public int getTime(){
		return this.currTime;
	}
	
	//run method
	public void run(){
		int currTime = 0;
		while(currTime != maxMinutes){
			try {
				sleep(10000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}	
			currTime++;
		}
	}
}